package com.situ.yB2C.user.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.situ.yB2C.user.pojo.User;


@Repository
public interface UserDao {
	
	int insert(User user);
	
	List<User> selectList();
	
	//根据主键查询一个实例
	User selectOne(Long rowId);
	
	//帐号的唯一性
	User selectOneByCode(String userCode);
	
	User selectOneByCodeAndPass(@Param("userCode")String userCode,@Param("userPass")String userPass);
	
	//更新
	int update(User user);
	//删除
	int delete(Long rowId);
	
	User selectUserByIdAndPassAndKind(@Param("rowId")Long rowId, @Param("userPass")String userPass,@Param("userKind")Integer userKind);
	
	User selectUserByCodeAndPassAndKind(@Param("userCode")String userCode, @Param("userPass")String userPass,@Param("userKind")Integer userKind);
	
	int updateById(User buyer);
}
